package org.demo.ribbon.controller;

import org.demo.ribbon.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * \* Created with IntelliJ IDEA.
 * \* User: jack
 * \* Date: 2019/1/24
 * \* Time: 14:47
 * \* Description:
 * \
 */
@RestController
public class HelloController {
    @Autowired
    HelloService helloService;

    @GetMapping("/ribbon/hello/{requestName}")
    public String sayHello(@PathVariable("requestName") String requestName){
        return helloService.hello(requestName);
    }
}
